Beginning App Development with Parse and Phonegap by Wilkins Fernandez & Stephan Alber

Beginning App Development with Parse and Phonegap by Wilkins Fernandez & Stephan Alber

Author:Wilkins Fernandez & Stephan Alber
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


Listing 7-10. Login View Configuration (www/login.html)

<script>

var config = {

view: ’login’

};

app.initialize();

</script>

Add a new JavaScript file to www/js/views/login.js for this view. Attach a submit event handler to the form (Listing 7-11). The submission of the form will call a submit function, which you’ll populate shortly. Next, add a script reference to the new file (Listing 7-12).

Listing 7-11. Login Template (www/js/login.js)

app.login = {

initialize: function() {

$(’form’).on(’submit’, function(event) {

event.preventDefault();

app.login.submit();

});

},

submit: function() {}

};



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.